// Reference:
// Fung, S. P. (2021). Is this the simplest (and most surprising) sorting algorithm ever? arXiv:2110.01111

package sorting

import "gitee.com/guuzaa/sorting/constraints"

func CBICSort[T constraints.Ordered](arr []T) []T {
	for i := 0; i < len(arr); i++ {
		for j := 0; j < len(arr); j++ {
			if arr[i] < arr[j] {
				arr[i], arr[j] = arr[j], arr[i]
			}
		}
	}

	return arr
}
